﻿using System;
using UnityEngine;

public class ActiveIfPlayerEnter : MonoBehaviour
{
    public GameObject target;

    private void OnTriggerEnter(Collider co)
    {
        if (co.tag == GameTags.Player)
        {
            this.target.SetActive(true);
        }
    }

    private void OnTriggerExit(Collider co)
    {
        if (co.tag == GameTags.Player)
        {
            this.target.SetActive(false);
        }
    }
}

